package javase.computer_peripheral;

class Computer {

    public void start(){
        System.out.println("电脑开机");
    }

    //独立方法
    public void peripheral(USB usb){
        if(usb instanceof Keyboard){
            Keyboard keyboard = (Keyboard) usb;
            keyboard.knock();
        }else if (usb instanceof Mouse){
            Mouse mouse = (Mouse) usb;
        }
    }

    public void end(){
        System.out.println("电脑关机");
    }

}
